package com.haochu.novel.util;

import android.annotation.SuppressLint;

/**
 * @author fuhuichao
 * 2017年6月22日16:58:12
 * 常量类
 */
public class Constants {

	// 小说内容和标题的默认字体大小
	public static float DEFAULT_BOOKCONTENT_TEXTSIZE = 30f;
	public static float DEFAULT_BOOKTITLE_TEXTSIZE = 25f;
	
	// 默认行距
	public static float DEFAULT_BOOKCONTENT_SPACING = 10f;
	
	// 默认边距
	public static float DEFAULT_BOOKCONTENT_MARGINTOP = 20f;
	public static float DEFAULT_BOOKCONTENT_MARGINBOTTOM = 20f;
	public static float DEFAULT_BOOKCONTENT_MARGINLEFT = 0f;
	public static float DEFAULT_BOOKCONTENT_MARGINRIGHT = 0f;
	public static float DEFAULT_BOOKCONTENT_PADDINGTOP = 60f;
	public static float DEFAULT_BOOKCONTENT_PADDINGBOTTOM = 60f;
	public static float DEFAULT_BOOKCONTENT_PADDINGLEFT = 30f;
	public static float DEFAULT_BOOKCONTENT_PADDINGRIGHT = 30f;
	
	// 默认编码
	public static String DEFAULT_CHARSET = "GBK";
	
	// 小说地址
	@SuppressLint("SdCardPath") 
	public static String BOOKPATH = "/mnt/sdcard/test.txt";
	
	// 缓存文件名
	public static String REFERENCE_FILENAME = "com.haochu.novel"; 
	
	// 正则表达式智能断章
	public static String REGEX_PATTERN_CATEGORY = "第([\u4e00-\u9fa5]|[0-9]){1,8}(卷|篇|章).{0,}\r\n";
	
	// 正则表达式去除段首空白字符
	public static String REGEX_PATTERN_PARAGRAGH = "^(\t| ){0,}";
	
	// 正则表达式去除章节目录的回车
	public static String REGEX_PATTERN_SECTITLE = "(\r\n)|\n|\r";
	
	// 首行缩进字符
	public static String FIRST_LINE_INDENT = "\u3000\u3000";
	
	// 目录章节返回代码
	public static final int RESULT_CODE_CATEGORY = 1000;
	public static final int REQUEST_CODE_ACTIVITY = 1;
	
	// 目录章节返回字段key
	public static final String RESULT_KEY_CATEGORY = "category_position";
	
	// 缓存文件参数
	public static final String PREFERENCE_KEY_TEXTSIZE = BOOKPATH + "_textSize";
	public static final String PREFERENCE_KEY_MBBINDEX = BOOKPATH + "_mbbIndex";
	public static final String PREFERENCE_KEY_PAGETOTAL = BOOKPATH + "_pageTotal";
	public static final String PREFERENCE_KEY_PAGENUMBERKEY = BOOKPATH + "_pageNumberKey";
	public static final String PREFERENCE_KEY_PAGENUMBERVALUE = BOOKPATH + "_pageNumberValue";
	
}
